import request from '@/utils/request'

export const searchRecommendList = () => {
  return request({
    url: "/v1/search/recommend/keyword/get",
    method: "get",
  });
}

export const searchList = (params) => {
  //console.log(params)
  switch (params.id) {
    
    //报刊社搜索 v1/search/presses/list
    case 1:
      return request({
        url: "/v1/search/presses/list",
        method: "get",
        params,
      })
    //活动搜索 v1/search/activity/list
    case 2:
      return request({
        url: "/v1/search/activity/list",
        method: "get",
        params,
      })
    //专栏搜索 v1/search/column/list
    case 3:
      return request({
        url: "/v1/search/column/list",
        method: "get",
        params,
      })

    //音频搜索 v1/search/audio/list
    case 4:
      return request({
        url: "/v1/search/audio/list",
        method: "get",
        params,
      })

    //人物搜索 v1/search/person/list
    case 5:
      return request({
        url: "/v1/search/person/list",
        method: "get",
        params,
      })

    //文章搜索 v1/search/article/list
    case 6:
      return request({
        url: "/v1/search/article/list",
        method: "get",
        params,
      })

    //纸刊搜索 v1/search/journal/list
    case 7:
      return request({
        url: "/v1/search/journal/list",
        method: "get",
        params,
      })

    //文创产品搜索 v1/search/cultural/creative/products/list
    case 8:
      return request({
        url: "/v1/search/cultural/creative/products/list",
        method: "get",
        params,
      })

    //数据库产品搜索 v1/search/database/products/list
    case 9:
      return request({
        url: "/v1/search/database/products/list",
        method: "get",
        params,
      })

    //原创IP搜索 v1/search/ip/products/list
    case 10:
      return request({
        url: "/v1/search/ip/products/list",
        method: "get",
        params,
      })
  }
}